package com.lt.androidsocketserver;

import com.lt.androidsocketserver.http.HttpCallback;
import com.lt.androidsocketserver.http.HttpServer;
import com.sun.tools.classfile.ConstantPool;

import java.nio.charset.StandardCharsets;

public class Main {
    private boolean isRunning = false;

    public static void main(String[] args){


        HttpServer httpServer =new HttpServer(new HttpCallback() {
            @Override
            public byte[] onResponse(String request) {
                System.out.println("请求数据 : "+ request);
                /****
                 * 根据请求数据
                 * 查询业务
                 * 返回相关数据到客户端
                 */
                return "LIUTONG".getBytes(StandardCharsets.UTF_8);
            }
        });
        httpServer.startServer();
    }
}
